package com.ruoyi.circle.dao;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.circle.domain.CircleBasicInfo;
import com.ruoyi.circle.mapper.CircleBasicInfoMapper;

/**
 * 圈子统计数据访问层接口
 *
 * @author 区嘉盛
 * @date 2025-06-12
 */
public interface ICircleStatisticsDao extends IService<CircleBasicInfo> {

    default CircleBasicInfoMapper getMapper(){return (CircleBasicInfoMapper) getMapper();}

    /**
     * 更新圈子帖子数量
     *
     * @param circleId 圈子ID
     * @return 帖子数量
     */
    void updateCirclePostCount(Long circleId);

    /**
     * 更新圈子热度分数
     *
     * @param circleId 圈子ID
     * @return 热度分数
     */
    void updateCircleHeatScore(Long circleId);

    /**
     * 计算圈子热度分数
     *
     * @param circleId 圈子ID
     * @return 热度分数
     */
    BigDecimal calculateHeatScore(Long circleId);
}